﻿using System;
using System.Collections.Generic;
using System.Text;

namespace DotNetCore.BannerManagement.BLL
{
    public class ImageManager
    {

        public void InsertImage(Domain.dnc_Image image)
        {

            DAL.Domain.dnc_ImageRepositoryArtifacts.dnc_ImageRepository repository = new DAL.Domain.dnc_ImageRepositoryArtifacts.dnc_ImageRepository();

            repository.Add(image);

        }

        public Domain.dnc_Image GetImageByID(Int32 imageID)
        {

            DAL.Domain.dnc_ImageRepositoryArtifacts.dnc_ImageRepository repository = new DAL.Domain.dnc_ImageRepositoryArtifacts.dnc_ImageRepository();

            return repository.Getdnc_ImageByID(imageID);

        }

        public void UpdateImage(Domain.dnc_Image image)
        {

            DAL.Domain.dnc_ImageRepositoryArtifacts.dnc_ImageRepository repository = new DAL.Domain.dnc_ImageRepositoryArtifacts.dnc_ImageRepository();

            repository.Save(image);

        }

        public List<Domain.dnc_Image> GetAllImages()
        {

            DAL.Domain.dnc_ImageRepositoryArtifacts.dnc_ImageRepository repository = new DAL.Domain.dnc_ImageRepositoryArtifacts.dnc_ImageRepository();

            return repository.GetAllFromdnc_Image();

        }
    }
}
